/**
 * Created by JetBrains WebStorm.
 * User: liucw
 * Date: 13-2-20
 * Time: 下午7:57
 * To change this template use File | Settings | File Templates.
 */
function route(handle,pathname,response,request){
    if(typeof handle[pathname] === 'function'){
        handle[pathname](response,request);
    }else{
        response.writeHead(404,{"Content-Type":"text/plain"});
        response.write("404 Not found!");
        response.end();
    };
};
exports.route = route;